﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace Freshome.m.vms
{
    internal class Firstab : TabItemate
    {
        public Firstab(string nm)
            : base(nm, false)
        {
            this.Content = new vws.Firstab() { DataContext = this };
        }
        private MainWindow _vmm = null;
        public MainWindow Vmm
        {
            get
            {
                if (_vmm == null)
                {
                    Freshome.m.MainWindow wnd = Application.Current.MainWindow as Freshome.m.MainWindow;
                    if (wnd != null)
                    {
                        _vmm = wnd.DataContext as MainWindow;
                    }
                }
                return _vmm;
            }
        }
        public ICommand MajorawCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.MajorawCmd;
                }
                else return null;
            }
        }
        public ICommand MinorawCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.MinorawCmd;
                }
                else return null;
            }
        }
        public ICommand ColdishCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.ColdishCmd;
                }
                else return null;
            }
        }
        public ICommand DishotCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.DishotCmd;
                }
                else return null;
            }
        }
        public ICommand SoupotCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.SoupotCmd;
                }
                else return null;
            }
        }
        public ICommand SnackCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.SnackCmd;
                }
                else return null;
            }
        }
        public ICommand PastryCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.PastryCmd;
                }
                else return null;
            }
        }
        public ICommand DrinkCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.DrinkCmd;
                }
                else return null;
            }
        }
        public ICommand HealthCmd
        {
            get
            {
                if (Vmm != null)
                {
                    return _vmm.HealthCmd;
                }
                else return null;
            }
        }
    }
}
